package spi;
import org.apache.dubbo.common.extension.ExtensionLoader;

/**
 * 这是我打断点在{@link ExtensionLoader#createAdaptiveExtensionClass()}然后获取的源码字符串
 */
public class MySpi$Adaptive2023 implements spi.MySpi {
    public void hello(java.lang.String arg0)  {
        throw new UnsupportedOperationException("The method public abstract void spi.MySpi.hello(java.lang.String) of interface spi.MySpi is not adaptive method!");
    }
    public java.lang.String adaptiveTwo(spi.MyURL arg0)  {
        if (arg0 == null) throw new IllegalArgumentException("spi.MyURL argument == null");
        if (arg0.getUrl() == null) throw new IllegalArgumentException("spi.MyURL argument getUrl() == null");
        org.apache.dubbo.common.URL url = arg0.getUrl();
        String extName = url.getParameter("param1", url.getParameter("param2", "two"));
        if(extName == null) throw new IllegalStateException("Failed to get extension (spi.MySpi) name from url (" + url.toString() + ") use keys([param1, param2])");
        spi.MySpi extension = (spi.MySpi)ExtensionLoader.getExtensionLoader(spi.MySpi.class).getExtension(extName);
        return extension.adaptiveTwo(arg0);
    }
    public java.lang.String adaptiveOne(org.apache.dubbo.common.URL arg0)  {
        if (arg0 == null) throw new IllegalArgumentException("url == null");
        org.apache.dubbo.common.URL url = arg0;
        String extName = url.getParameter("param1", url.getParameter("param2", "two"));
        if(extName == null) throw new IllegalStateException("Failed to get extension (spi.MySpi) name from url (" + url.toString() + ") use keys([param1, param2])");
        spi.MySpi extension = (spi.MySpi)ExtensionLoader.getExtensionLoader(spi.MySpi.class).getExtension(extName);
        return extension.adaptiveOne(arg0);
    }
}